<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VueComponent</title>
    <script src="../Vue.js"></script>
    <style>
        #root {
            width: 100%;
            height: 1000px;
            /*background: #4494ff;*/

        }
    </style>
</head>
<body>
<div id="root">

</div>

<script>
    var son1 = {
        data(){
            return{
                msg:'zs'
            }
        },
        methods:{
            son1F(){
                alert(123)
            }
        },
        template: "<div @click='son1F'>123</div>"
    }
    new Vue({
        el: '#root',
        components: {
            son1: son1
        },
        template:'<son1 ></son1>'
    })
</script>
</body>
</html>